package com.xuchaotong.service;

import java.lang.reflect.Proxy;

public class UserProxyTest {
    public static void main(String[] args) {
        UserServiceInvocationHandler invocationHandler = new UserServiceInvocationHandler();
        UserService userService = (UserService) Proxy.newProxyInstance(UserService.class.getClassLoader(),new Class[]{UserService.class},invocationHandler);

        userService.addUser();
    }
}
